package cn.cfoodc.sharding.mapper;

import cn.cfoodc.sharding.controller.dto.OrderAndOrderItemDto;
import cn.cfoodc.sharding.controller.dto.OrderBingdingOrderItemDto;
import cn.cfoodc.sharding.domain.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface OrderMapper {
    int deleteByPrimaryKey(Long orderId);

    int insert(Order record);

    Order selectByPrimaryKey(Long orderId);

    int updateByPrimaryKey(Order record);

    OrderAndOrderItemDto selectOneByUseridAndOrderid(@Param("userId") Long userId , @Param("orderId")Long orderId);

    List<OrderBingdingOrderItemDto> selectAllOrderBingdingOrderItem(Long userId , Long orderId);

    List<OrderBingdingOrderItemDto> selectAllOrderBingdingOrderItem2( Long userId , Long userId2);
}